﻿using System.Security.Cryptography;
using System.Text;

namespace Utilities.Security.Cryptography
{
    public class SHA1Hasher : IHasher
    {
        SHA1 sha1 = SHA1CryptoServiceProvider.Create();

        public byte[] ComputeHash(string data)
        {
            return sha1.ComputeHash(Encoding.Default.GetBytes(data));
        }
        public byte[] ComputeHash(byte[] data)
        {
            return sha1.ComputeHash(data);
        }
    }
}
